cmake_minimum_required(VERSION 3.10)
project(proto-demo LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)

find_package(Protobuf REQUIRED)

include_directories(.)
add_executable(proto-demo main.cpp config.pb.cc)


# 链接 Protocol Buffers 库
target_link_libraries(proto-demo PRIVATE ${Protobuf_LIBRARIES})

# 添加包含目录
target_include_directories(proto-demo PRIVATE ${Protobuf_INCLUDE_DIRS})
